from appium import webdriver
import time

desired_caps = {}
desired_caps['platformName'] = 'Android'
desired_caps['platformVersion'] = '5.1.1'
desired_caps['deviceName'] = '127.0.0.1:62001'
# desired_caps['appPackage'] ='com.youba.calculate'
# desired_caps['appActivity'] ='.MainActivity'
desired_caps['noReset'] = True
driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)


#==============锁定=====================
#driver.lock(10)

#============摇晃===================
#driver.shake()

#=============当前 Activity=============
#print(driver.current_activity)

#================滑动=================
#driver.swipe(100, 50, 200, 0, 0.6)